# 添加以下功能可提升体验：

# 1. 会话持久化（保存到文件）
import pickle

def save_session(filename="session.pkl"):
    with open(filename, 'wb') as f:
        pickle.dump(conversation_history, f)

def load_session(filename="session.pkl"):
    global conversation_history
    try:
        with open(filename, 'rb') as f:
            conversation_history = pickle.load(f)
    except FileNotFoundError:
        conversation_history = [{"role": "system", "content": "默认系统提示"}]
